/*
 * Copyright (c) 2015. For Intelligent Group.
 */

package com.intelligent.ispc.core.service;

import com.intelligent.ispc.core.dto.*;
import com.intelligent.ispc.external.rcall.dto.ControlDataDto;
import com.intelligent.ispc.external.rcall.dto.NormalDistributionDto;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;
import java.util.Map;

/**
 * Created by Julia.Zhou on 2016/02/28.
 */
public interface SpcAnalysisService {

    List<TestItemDto> searchTestItem(Map<String, Object> searchParams);

    List<TestItemDto> searchTestItemFiltered(Map<String, Object> searchParams);

    Page<TestItemDto> searchTestItem(Map<String, Object> searchParams, Pageable pageable);

    List<BaseDto> searchDistinctTestItem(Map<String, Object> searchParams);

    Page<BaseDto> searchDistinctTestItem(Map<String, Object> searchParams, Pageable pageable);

    List<StationDto> findStationByProject(String projectId);

    List<BaseDto> searchDistinctSlot(Map<String, Object> searchParams);

    List<String> searchDistinctSN(Map<String, Object> searchParams);

    List<CPWarningRuleDto> searchCPWarningRuleByProject(String projectId);

    List<ControlChartWarningRuleDto> searchCCWarningRuleByProject(String projectId);

    NormalDistributionDto analyseNormalDistribution(Map<String, Object> searchParams);

    ControlDataDto analyseControlChart(Map<String, Object> searchParams);

    void deleteTestData (String uuid, String projectId);

    void invalidateCacheExcludeIds (Map<String, Object> searchParams);

    boolean saveExcludeIds (Map<String, Object> searchParams);

}
